Skip to content

Security hardening: eliminate shell injection vulnerabilities#3

Merged
theoephraim merged 2 commits into
mainfrom
fix/shell-injection-security
Apr 15, 2026
Merged

Security hardening: eliminate shell injection vulnerabilities#3
theoephraim merged 2 commits into
mainfrom
fix/shell-injection-security

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Replace shell string interpolation (execSync/exec) with execFile-based argument arrays throughout the codebase, preventing command injection via branch names, PR numbers, config values, package names, and registry URLs.

  • Add runArgs/runArgsAsync/tryRunArgs and sq() shell-quote helper to shell.ts
  • Migrate all git/gh commands to argument arrays in git.ts, ci.ts, check.ts, generate.ts, version.ts, changelog-github.ts, github-release.ts
  • Add input validation for branch names and PR numbers
  • Remove broken escapeShell function in favor of shell-free execution
  • Use sq() for template substitutions in custom publish commands
  • Convert buildPublishCommand/getPackCommand to return argument arrays
  • Restrict dynamic changelog formatter imports to project root
  • Use three-word random names to reduce changeset filename collisions

@github-actions

Copy link
Copy Markdown

🐸 Bumpy Release Plan

1 changeset(s) → 1 package(s) to release

🟢 Patch

Package Change
@varlock/bumpy 0.0.1 → 0.0.2

This comment is maintained by bumpy.

theoephraim and others added 2 commits April 14, 2026 21:54
Replace shell string interpolation (execSync/exec) with execFile-based
argument arrays throughout the codebase, preventing command injection via
branch names, PR numbers, config values, package names, and registry URLs.

- Add runArgs/runArgsAsync/tryRunArgs and sq() shell-quote helper to shell.ts
- Migrate all git/gh commands to argument arrays in git.ts, ci.ts,
  check.ts, generate.ts, version.ts, changelog-github.ts, github-release.ts
- Add input validation for branch names and PR numbers
- Remove broken escapeShell function in favor of shell-free execution
- Use sq() for template substitutions in custom publish commands
- Convert buildPublishCommand/getPackCommand to return argument arrays
- Restrict dynamic changelog formatter imports to project root
- Use three-word random names to reduce changeset filename collisions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theoephraim theoephraim force-pushed the fix/shell-injection-security branch from 78fb5c7 to d28c9ac Compare April 15, 2026 04:54
@theoephraim theoephraim merged commit dd7679b into main Apr 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant